<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <link rel="shortcut icon" href="pics/title.ico" type="image/x-icon"/>
  <meta name="keywords" content="数据共享平台">
  <title>数据共享平台</title>
  <link rel="stylesheet" type="text/css" href="style/main.css"></link>
  <script type="text/javascript" src="script/main.js"></script>
</head>

<body onload="init();">

  <div id="header" class="header">
    <div class="title_img_div"><img src="pics/title.png" class="title_img"></img></div>
    <div id="title" class="title"><span>Data Sharing Platform</span></div>
    <div id="title_info" class="title_info">
      This Website is used for sharing what you thought was funny and interesting! But take care about your comments for your local policy.
      &nbsp;&nbsp; -- @Raven
      <br/>
      <a href="#" class="log_link">Login</a>&nbsp;&nbsp;<a href="#" class="log_link">Sign Up</a>
    </div>
  </div>

  <div id="content" class="content">
    <div id="say_container" class="say_container">
      <div id="publish">
        <form id="publish_form" action="handle.php" method="post" enctype="multipart/form-data">
          <textarea rows="8" cols="80" id="publish_content" name="publish_content" maxlength="1024"></textarea>
          <p/>
          <input id="image_file" type="file" id="publish_picture" name="publish_picture" />
          <input type="submit" value="Publish" />
        </form>
      </div>

      <div id="details">

        <?php
        $con = mysql_connect("localhost","root","123456");
        if (!$con) {
          echo "Database error<br/>";
        } else {
          mysql_select_db("platform", $con);

          $result = mysql_query("SELECT * FROM publish ORDER BY pid DESC");

          while($row = mysql_fetch_array($result))
            {
              echo "<div id='details_border' class='details_border'>";
              echo "<div id='details_uname' class='details_uname'>User IP : " . $row['uname'] . "</div>";
              echo "<div id='details_content' class='details_content'>" . $row['content'] . "</div>";
              if ($row['picture'] != "") {
                echo "<div id='details_picture' class='details_picture'><img class='details_picture_img' src='" . $row['picture'] . "'></img></div>";
              }
              echo "</div>";
            }

          mysql_close($con);
        }
        ?>


      </div>
    </div>
  </div>

  <div id="footer" class="footer">
    Tech by @Raven (kissdarkwind@gmail.com) <br/>
    All rights reserved from 2014 ~ future :)
  </div>

</body>

</html>